Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NGSTACK-957 read and output stderr from eslint and prettier #15

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

amalija-ramljak
Copy link
Member

Changes

  • original eslint and prettier hooks were missing the stderr from the commands, which leads to confusion when it throws an error due to node version
  • error is displayed like in HGSTACK-938 new hooks #14

Testing

  • use wrong node version from the one defined in project
  • add a test change to and stage a js file
  • add JSLinter to pre-commit hooks
  • run git commit - should see error with node version being wrong (expected version...)
  • do the same with JSPrettier

minimal adding of hooks to pre-commit

{
    "action": "\\Netgen\\GitHooks\\Action\\JSLinter",
    "options": {
        "excluded_files": []
    }
},
{
    "action": "\\Netgen\\GitHooks\\Action\\JSPrettier",
    "options": {
        "excluded_files": []
    }
},

@amalija-ramljak amalija-ramljak self-assigned this Dec 17, 2024
@emodric emodric requested a review from iherak December 17, 2024 14:37
@emodric
Copy link
Member

emodric commented Dec 17, 2024

Needs CS Fixer.

@emodric emodric merged commit 7aa2ebb into master Dec 19, 2024
2 checks passed
@emodric emodric deleted the NGSTACK-957-git-hooks-node-version-error branch December 19, 2024 10:49
@emodric
Copy link
Member

emodric commented Dec 19, 2024

Thanks @amalija-ramljak !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants